import axios from 'axios';

const BASE_URL = process.env.VUE_APP_API_BASE_URL;

export default {
  fetchCoupons ({ param1, param2 }) {
    const url = `${BASE_URL}/coupons`;
    return new Promise((resolve, reject) => {
      axios.get(url, {
        params: { param1, param2 }
      })
      .then(res => resolve(res))
      .catch(err => reject(err));
    });
  }
}